import { AutoImportUtil } from '@xtail/unplugin'
import { ImportsMap } from 'unplugin-auto-import/types'
import {
  Package_Name,
  /**
   * API
   */
  // Arr
  FlattenTreeStrategyConst_Name,
  ArrUtil_Name,
  // Bool
  BoolUtil_Name,
  // Common
  CommonUtilName,
  // Fun
  LimitCallExceedStrategyConst_Name,
  FunUtil_Name,
  // Num
  NumUtil_Name,
  // Obj
  ObjUtil_Name,
  // Reg
  IPv4Reg_Name,
  DomainReg_Name,
  RegUtil_Name,
  // Str
  StrUtil_Name,
  // Symbol
  SymbolUtil_Name,
  /**
   * 类型
   */
  // Arr
  Convert2MapType_Name,
  Convert2TreeType_Name,
  Convert2TreeNodeType_Name,
  Convert2TreeReturnTreeType_Name,
  Convert2TreeReturnMapType_Name,
  Convert2TreeReturnType_Name,
  CopyArrDeepType_Name,
  CountArrItemType_Name,
  FlattenTreeType_Name,
  FlattenTreeStrategyConstType_Name,
  FlattenTreeOptionsType_Name,
  GetArrLastType_Name,
  IsArrType_Name,
  IsEmptyArrType_Name,
  IsIncludeInArrType_Name,
  RepeatArrType_Name,
  TraverseArrDeepType_Name,
  // Bool
  IsBoolType_Name,
  UseBoolType_Name,
  BoolValSetterType_Name,
  BoolValGetterType_Name,
  // Common
  CopyDeepTargetPropValPreHandlerType_Name,
  CopyDeepOptionsType_Name,
  TraverseDeepOptions_Name,
  TraverseDeepRecursionOptionsType_Name,
  IsAnyEqType_Name,
  IsNoneType_Name,
  IsNullType_Name,
  IsUndefinedType_Name,
  // Fun
  ThrottleUtilParamFun_Name,
  ThrottleUtilReturn_Name,
  IsFunType_Name,
  LimitCallOptionsType_Name,
  LimitCallExceedStrategyConstType_Name,
  LimitCallType_Name,
  ThrottleByLimitOptionsType_Name,
  ThrottleByLimitType_Name,
  ThrottleByTimeOptionsType_Name,
  ThrottleByTimeType_Name,
  // Num
  IsNumType_Name,
  // Obj
  ConvertObjType_Name,
  CopyObjDeepType_Name,
  IsObjType_Name,
  TraverseObjDeepType_Name,
  // Reg
  IsDomainLegalType_Name,
  IsIpv4LegalType_Name,
  // Str
  IsEmptyStrType_Name,
  IsStrType_Name,
  // Symbol
  IsSymbolType_Name
} from '@xtail/core'

export const XTailCoreAutoImports: () => ImportsMap = () =>
  AutoImportUtil.genAutoImports(Package_Name, [
    // Arr
    FlattenTreeStrategyConst_Name,
    ArrUtil_Name,
    // Bool
    BoolUtil_Name,
    // Common
    CommonUtilName,
    // Fun
    LimitCallExceedStrategyConst_Name,
    FunUtil_Name,
    // Num
    NumUtil_Name,
    // Obj
    ObjUtil_Name,
    // Reg
    IPv4Reg_Name,
    DomainReg_Name,
    RegUtil_Name,
    // Str
    StrUtil_Name,
    // Symbol
    SymbolUtil_Name
  ])

export type XTailCoreAutoImportsType = typeof XTailCoreAutoImports

export const XTailCoreTypeAutoImports = () =>
  AutoImportUtil.genTypeAutoImports(Package_Name, [
    // Arr
    Convert2MapType_Name,
    Convert2TreeType_Name,
    Convert2TreeNodeType_Name,
    Convert2TreeReturnTreeType_Name,
    Convert2TreeReturnMapType_Name,
    Convert2TreeReturnType_Name,
    CopyArrDeepType_Name,
    CountArrItemType_Name,
    FlattenTreeType_Name,
    FlattenTreeStrategyConstType_Name,
    FlattenTreeOptionsType_Name,
    GetArrLastType_Name,
    IsArrType_Name,
    IsEmptyArrType_Name,
    IsIncludeInArrType_Name,
    RepeatArrType_Name,
    TraverseArrDeepType_Name,
    // Bool
    IsBoolType_Name,
    UseBoolType_Name,
    BoolValSetterType_Name,
    BoolValGetterType_Name,
    // Common
    CopyDeepTargetPropValPreHandlerType_Name,
    CopyDeepOptionsType_Name,
    TraverseDeepOptions_Name,
    TraverseDeepRecursionOptionsType_Name,
    IsAnyEqType_Name,
    IsNoneType_Name,
    IsNullType_Name,
    IsUndefinedType_Name,
    // Fun
    ThrottleUtilParamFun_Name,
    ThrottleUtilReturn_Name,
    IsFunType_Name,
    LimitCallOptionsType_Name,
    LimitCallExceedStrategyConstType_Name,
    LimitCallType_Name,
    ThrottleByLimitOptionsType_Name,
    ThrottleByLimitType_Name,
    ThrottleByTimeOptionsType_Name,
    ThrottleByTimeType_Name,
    // Num
    IsNumType_Name,
    // Obj
    ConvertObjType_Name,
    CopyObjDeepType_Name,
    IsObjType_Name,
    TraverseObjDeepType_Name,
    // Reg
    IsDomainLegalType_Name,
    IsIpv4LegalType_Name,
    // Str
    IsEmptyStrType_Name,
    IsStrType_Name,
    // Symbol
    IsSymbolType_Name
  ])

export type XTailCoreTypeAutoImportsType = typeof XTailCoreTypeAutoImports
